package com.hqyj.pojo;

import java.util.List;

public class PageData <T>{
    private int currentPage; //当前页
    private int pageSize; //每页记录数
    private int nextPage; //下一页记录数
    private int previousPage; //上一页记录数
    private int totalPage; //总页数
    private long totalSize; //总记录数
    private List<T> list;  //存放当前页的记录集合

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getNextPage() {
        return nextPage;
    }

    public void setNextPage(int nextPage) {
        this.nextPage = nextPage;
    }

    public int getPreviousPage() {
        return previousPage;
    }

    public void setPreviousPage(int previousPage) {
        this.previousPage = previousPage;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(long totalSize) {
        this.totalSize = totalSize;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageData{" +
                "currentPage(当前页)=" + currentPage +
                ", pageSize(每页记录条数)=" + pageSize +
                ", nextPage(下一页)=" + nextPage +
                ", previousPage(上一页)=" + previousPage +
                ", totalPage(总页数)=" + totalPage +
                ", totalSize(总记录条数)=" + totalSize +
                ", list(当前页的记录)=" + list +
                '}';
    }
}
